Replace config file parser for "xl"
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Mar 2010 17:39:22 +0000 (17:39 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Mar 2010 17:39:22 +0000 (17:39 +0000)
commitb104c3762dcbe310318a14bed35f0813db48a26d
tree6ec4448b8b7c28e306348ebad1b41a4555ff83f7
parent24c2f2ccee02f7bf83bf8a9ffdb204cf8d40c653
Replace config file parser for "xl"

This provides a replacement config file parser for "xl" based on bison
and flex.

Benefits:
  * proper error reporting with line numbers
  * parser can understand nearly all "xm" configuration files directly
     (doesn't understand Python code but should do everything else)
  * parser also understands the ;-infested "xl" style files
  * removes the dependency on libconfig
  * better checking for certain kinds of mistakes
  * eliminates the strange "massage file and try again" code

This is intended to support all config files currently supported by
"xl" and almost all files supported by "xm".  (NB that whether a
feature works depends on the implementation of that feature in
xl/libxl of course.)

This patch also introduces a new library "libxlutil" which is mainly
for the benefit of "xl".  Users of libxl do not need to use libxlutil,
but they can do so if they want to parse "xl" files without being
"xl".

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
.hgignore
Config.mk
README
tools/libxl/Makefile
tools/libxl/libxlu_cfg.c [new file with mode: 0644]
tools/libxl/libxlu_cfg_i.h [new file with mode: 0644]
tools/libxl/libxlu_cfg_l.l [new file with mode: 0644]
tools/libxl/libxlu_cfg_y.y [new file with mode: 0644]
tools/libxl/libxlu_internal.h [new file with mode: 0644]
tools/libxl/libxlutil.h [new file with mode: 0644]
tools/libxl/xl.c